package com.example.houduan.service.impl;

import com.example.houduan.entity.Blog;
import com.example.houduan.mapper.BlogMapper;
import com.example.houduan.service.BlogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.houduan.service.TagService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author anonymous
 * @since 2024-08-27
 */
@Service
public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements BlogService {

    @Override
    public void addblog(Blog blog) {
        baseMapper.addBlog(blog);
    }

    @Override
    public void delByusername(String username) {

        baseMapper.delByusername(username);
    }

    @Override
    public List<Blog> getByusername(String username) {
       List<Blog> a=baseMapper.getByusername(username);
       return a;
    }



    @Override
    public List<Blog> getTenBlog() {
       return baseMapper.getTenBlog();
    }

    @Override
    public List<Blog> getTenBlogByShunxu(int a) {

        return baseMapper.getTenBlogByShunxu(a);
    }
}
